﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Love.Awesome.SimpleTiledImplementation
{

    public class ImageInfoSizeComparer : IComparer<ImageInfo>
    {
        public int Compare(ImageInfo x, ImageInfo y)
        {
            if (x.Area == y.Area) return 0;
            return x.Area > y.Area ? 1 : -1;
        }

        public static ImageInfoSizeComparer Instance = new ImageInfoSizeComparer();
    }

    public class ImageInfoIdComparer : IComparer<ImageInfo>
    {
        public int Compare(ImageInfo x, ImageInfo y)
        {
            return (x.ID - y.ID);
        }

        public static ImageInfoIdComparer Instance = new ImageInfoIdComparer();
    }

   
    ///<summary>图形信息。</summary>
    public class ImageInfo
    {
        public ImageInfoEnum Type; 
        public Image Img;

        public float W;
        public float H;
        public float Area;
        public int ID;

        public string Name;
        public string LocalPath;


        public ImageInfo()
        {

        }

        public ImageInfo(string localPath)
        {
            LocalPath = localPath;
        }

    }
}
